import { useContext, useState } from 'react';
import { ThemeContext } from '../../context/ThemeContext';
import Drawer from '../Drawer';
import style from './Navbar.module.scss';

const Navbar = () => {
  const [open, setOpen] = useState<boolean>(false);
  const { IcMenu } = useContext(ThemeContext).image;

  return (
    <div className={style.self}>
      <img className={style.clickable} src={IcMenu} onClick={() => setOpen(true)} />
      <Drawer open={open} onClose={() => setOpen(false)} />
    </div>
  );
};

export default Navbar;
